package com.example.demo.request;

import java.math.BigDecimal;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import lombok.Builder;
import lombok.Data;

@Data
@Builder
public class BookRequest {
    @Valid
    @NotBlank(message = "书籍名称不能为空")
    private String name;

    @Valid
    @NotNull(message = "作者不能为空")
    private String author;

    @Valid
    @Positive(message = "价格必须大于0")
    private BigDecimal price;
}
